import { SecTimer } from "../../../../../com/gengine/core/frame/SecTimer";
import { TimerType } from "../../../../../com/gengine/core/frame/TimerType";
import { RolePlayer } from "../../../scene/player/entity/RolePlayer";
import { FWManager } from "../../../../../extend/flash/fireworks/FWManager";
import { FireWorkType } from "../../../../../extend/flash/fireworks/FireWorkType";
import { FirePlayType } from "../../../../../extend/flash/fireworks/FirePlayType";
type int = number;
//class MarrySceneFire
    
    export  class MarrySceneFire
    {
        

        public static startSceneFire(arg1: int): void
        {
            if (!MarrySceneFire._timer) 
            {
                MarrySceneFire._timer = new SecTimer(20);
            }
            MarrySceneFire._fireIndex = arg1;
            MarrySceneFire._timer.reset();
            MarrySceneFire._timer.addListener(TimerType.ENTERFRAME, MarrySceneFire.onTimeHandler);
            MarrySceneFire._timer.start();
            return;
        }

        /* internal  */static onTimeHandler(arg1: SecTimer): void
        {
            var loc1=new Object /* flash.geom.Point */(RolePlayer.instance.x, RolePlayer.instance.y);
            FWManager.instance.popup(1, MarrySceneFire._fireIndex, loc1, FireWorkType.MarryWeddingContinuedFire, "", FirePlayType.OrderPlay, 4000);
            return;
        }

        public static removeSceneFire(): void
        {
            if (MarrySceneFire._timer) 
            {
                MarrySceneFire._timer.stop();
            }
            return;
        }

        /* internal */ static /* var */_fireIndex: int;

        /* internal */ static /* var */_timer: SecTimer;
    }
